/**
 * 
 */
package com.user.query.controller;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author chuzz
 *
 */
@Component
public class SystemComponent {

	private static Properties pro;
	static{
		pro = new Properties();
		InputStream is =SystemComponent.class.getClassLoader().getResourceAsStream("system.properties");
		try {
			pro.load(is);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
	
	public static String getProperty(String key){
		return pro.getProperty(key);
	}
	/*@Value("#{system['upload.targetPath']}")
	private String uploadTargetPath;
	
	@Value("#{system['upload.tempPath']}")
	private String uploadTempPath;

	public String getUploadTargetPath() {
		return uploadTargetPath;
	}

	public void setUploadTargetPath(String uploadTargetPath) {
		this.uploadTargetPath = uploadTargetPath;
	}

	public String getUploadTempPath() {
		return uploadTempPath;
	}

	public void setUploadTempPath(String uploadTempPath) {
		this.uploadTempPath = uploadTempPath;
	}*/
	
	
}
